package com.junjie.checkin.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.junjie.checkin.entity.Enum.ActivityCheckInMethodEnum;
import com.junjie.checkin.entity.Enum.ActivityStatusEnum;
import com.junjie.checkin.entity.Enum.ActivityTypeEnum;
import com.junjie.checkin.entity.Enum.handler.ActivityCheckInMethodEnumTypeHandler;
import com.junjie.checkin.entity.Enum.handler.ActivityStatusEnumTypeHandler;
import com.junjie.checkin.entity.Enum.handler.ActivityTypeEnumTypeHandler;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;

@Data
@TableName("t_activity")
public class TActivity implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("title")
    private String title;

    @TableField("description")
    private String description;

    @TableField(value = "type", typeHandler = ActivityTypeEnumTypeHandler.class)
    private ActivityTypeEnum type;

    @TableField(value = "checkInMethod", typeHandler = ActivityCheckInMethodEnumTypeHandler.class)
    private ActivityCheckInMethodEnum checkInMethod;

    @TableField(value = "status", typeHandler = ActivityStatusEnumTypeHandler.class)
    private ActivityStatusEnum status;

    @TableField("max_participants")
    private Integer maxParticipants;

    @TableField("start_time")
    private Date startTime;

    @TableField("end_time")
    private Date endTime;

    @TableField("location")
    private String location;

    @TableField("point")
    private Integer point;

    @TableField("poster")
    private String poster;

    @TableField("rule_description")
    private String ruleDescription;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(value = "create_by")
    private String createBy;

    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @TableField(value = "update_by")
    private String updateBy;

    @TableField("latitude")
    private Double latitude;

    @TableField("longitude")
    private Double longitude;

    @TableField("checkInRadius")
    private Integer checkInRadius;
}